package org.mobai.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.page.PageMethod;
import org.mobai.mapper.OrderDao;
import org.mobai.model.Order;
import org.mobai.service.IOrderService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Administrator
 */
@Service
public class OrderServiceImpl extends ServiceImpl<OrderDao, Order> implements IOrderService {


    @Override
    public List<Order> listPage() {
        PageMethod.startPage(2, 4);

        QueryWrapper<Order> queryWrapper = new QueryWrapper<>();
        queryWrapper.orderByDesc("user_id");
        List<Order> list = this.list(queryWrapper);
        System.out.println(list);
        return list;



    }
}